1. Field of the Invention
The present invention relates to a filter coefficient setting device and an echo prevention device.
2. Description of the Related Art
Recently, some communication devices such as cellular phones and hands-free phones to which an earphone-microphone are connected incorporate an echo prevention device in order to prevent an echo generated by acoustic coupling traveling from a speaker to the microphone or electric reflection or the like on a circuit.
For example, Japanese Patent Laid-Open No. 2006-304260 discloses an echo prevention device which cancels an echo with high accuracy using digital processing. FIG. 13 is an example of the echo prevention device using a DSP 100. As shown in the figure, an analog signal indicating sound transmitted from the other party over a cell phone or the like is inputted to an AD converter 101. And the signal digital-converted by the AD converter 101 is given convolution processing based on respective filter coefficients by FIR filters 102, 103 in the DSP 100 and outputted. The signal outputted from the FIR filter 102 is inputted to a DA converter 104. And the signal analog-converted by the DA converter 104 is outputted to an earphone-microphone through an input/output terminal 105 and inputted to one of terminals of a differential amplifier circuit 106. The signal outputted from the FIR filter 103 is inputted to a DA converter 107. The signal outputted from the DA converter 107 is inputted to the other terminal of the differential amplifier circuit 106. And the signal outputted from the differential amplifier circuit 106 is converted to a digital signal by an AD converter 108 and inputted to the DSP 100.
Here, the DSP 100 obtains an impulse response from the DA converter 104 to the AD converter 108 by an output of the AD converter 108 when an impulse is outputted to the DA converter 104. Also, the DSP 100 obtains an impulse response from the DA converter 107 to the AD converter 108 by an output of the AD converter 108 when an impulse is outputted to the DA converter 107. And by appropriately setting the filter coefficients of the FIR filters 102, 103 based on these impulse responses, an echo by the signal inputted to the AD converter 101 can be removed by the differential amplifier circuit 106.
From the signal outputted from the AD converter 108, an output signal of an adaptive filter 111 is subtracted at a subtraction portion 110 in the DSP 100 and outputted. This adaptive filter 111 removes the echo which can not be fully removed by the differential amplifier circuit 106 by adaptively changing the filter coefficient so that the output signal from the subtraction portion 110 falls under a predetermined level while a sound signal is being transmitted from the other party. And the digital signal outputted from the subtraction portion 110 is converted to an analog signal at a DA converter 109, after being outputted from the DSP 100, and outputted as an output signal of the echo prevention device.
When the echo prevention device is started, the filter coefficients of the FIR filters 102, 103 are undefined values. Therefore, during the period till the impulse response is obtained upon instruction by a user and an appropriate filter coefficient is set for the FIR filters 102, 103, the echo is not cancelled but an unpleasant echo is transmitted to the other party. Moreover, since the user of the echo prevention device can not recognize that the discomfort echo is being transmitted to the other party, the user does not notice that he should instruct the echo prevention device to obtain the impulse response. Therefore, the unpleasant echo might be continuously transmitted to the other party.
Also, in the echo prevention device, the echo is further removed in the DSP 100 after the echo is removed in the differential amplifier circuit 106. For example, if the impulse response can not be obtained with high accuracy due to an influence of an electric noise, an ambient noise of the earphone-microphone wearer, or the like, the echo can not be sufficiently removed in the differential amplifier circuit 106 in some cases. In this case, by operation of the subtraction portion 110 and the adaptive filter 111 in the DSP 100, the echo which could not be removed by the differential amplifier circuit 106 is effectively removed. However, if the echo has been sufficiently removed by the differential amplifier circuit 106, the echo might be increased to the contrary by the operation of the subtraction portion 110 and the adaptive filter 111.
In the echo prevention device, the echo might be further removed in the DSP 100 after the echo has been removed by the differential amplifier circuit 106, but the echo is not completely removed but might remain in some cases. However, the talker on the other side does not feel a sense of discomfort with the echo returning substantially at the same time as uttering.
In the echo prevention device, a signal transmitted to the other party might be superimposed by a large noise due to an influence of a noise from an earphone-microphone 20 or an electric noise or the like in the circuit. As means to remove such a noise, the signal outputted from the subtraction portion 110 can be outputted through a noise canceller.
However, the noise canceller generally accumulates inputted data to some extent and then, outputs it with noise cancellation processing to the accumulated data, and a delay might occur according to the accumulated amount and the processed amount. Thus, even if the echo included in the signal outputted from the subtraction portion 110 is slight, the talker on the other side hears the echo with some delay after uttering, which causes a sense of discomfort.